<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=
    , initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>


    <div id="itany">
            <ul>
                
                <!-- <li v-for="value in arr">{{ value }}</li> -->
                <!-- <li v-for="value in user">{{ value }}</li> -->
                <!-- 键值循环 -->
                <!-- <li v-for="(v,k) in arr">{{k}}={{v}}</li> -->
                <!-- <li v-for="(v,k) in user">{{k}}={{v}}</li> -->
                <!-- 可以直接循环包含重复数据的集合，可以通过制定:key属性绑定唯一key，当更新元素时可重用元素,提高效率 -->
                <!-- <li v-for="(v,k) in arr2" :key="k">{{k}}={{v}}</li> -->
                <li v-for="(user,index) in users">
                   {{ index+1 }} {{ user.id }},{{ user.name }},{{ user.age }}
                </li>
            </ul>
          </div>
      
    
</body>
<script src="../utils/vue.js"></script>
<script>
    new Vue({
     el:"#itany",
     data: {
         arr:[12,4,5,34,2,11],
         arr2:[12,4,5,34,2,11,12],
         user:{id:9527,name:"唐伯虎",age:25},
         users:[
            {id:9527,name:"唐伯虎",age:25},
            {id:1001,name:"秋香",age:22},
            {id:1002,name:"石榴姐",age:24},
         ]
     }
    })
</script>
</html>